from concurrent.futures import ThreadPoolExecutor
import time
import threading


def _task():
    for i in range(2):
        print("this is i = {}; thread_id = {}".format(i, threading.get_native_id()))
        time.sleep(1)
    return time.time()


tp = ThreadPoolExecutor(10)
futures = []
for i in range(10):
    future = tp.submit(_task)
    futures.append(future)

for future in futures:
    print(future.result())
